
from whiff import resolver
from whiff.middleware import displayTraceback
import suggest

testapp = resolver.moduleRootApplication("/", suggest,
                                         #exception_middleware=None,
                                         exception_middleware=displayTraceback.__middleware__,
                                         on_not_found=None, # show traceback (could comment)
                                         )
if __name__=="__main__":
    import wsgiref.simple_server
    print "serving wsgi chat test at 8888"
    print "page at http://localhost:8888/reloadSuggest"
    srv = wsgiref.simple_server.make_server('localhost', 8888, testapp)
    srv.serve_forever()
                    
